| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cc9cbbf commit 5cc2c3f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,24 +204,17 @@ def callback(group): | |||
| 204 | 204 | bpython_logger.addHandler(logging.NullHandler()) | |
| 205 | 205 | curtsies_logger.addHandler(logging.NullHandler()) | |
| 206 | 206 | ||
| 207 | - logger.info(f"Starting bpython {__version__}") | ||
| 208 | - logger.info(f"Python {sys.executable}: {sys.version_info}") | ||
| 209 | - logger.info(f"curtsies: {curtsies.__version__}") | ||
| 210 | - logger.info(f"cwcwidth: {cwcwidth.__version__}") | ||
| 211 | - logger.info(f"greenlet: {greenlet.__version__}") | ||
| 212 | - logger.info(f"pygments: {pygments.__version__}") # type: ignore | ||
| 213 | - logger.info(f"requests: {requests.__version__}") | ||
| 214 | - logger.info( | ||
| 215 | - "environment:\n{}".format( | ||
| 216 | - "\n".join( | ||
| 217 | - f"{key}: {value}" | ||
| 218 | - for key, value in sorted(os.environ.items()) | ||
| 219 | - if key.startswith("LC") | ||
| 220 | - or key.startswith("LANG") | ||
| 221 | - or key == "TERM" | ||
| 222 | - ) | ||
| 223 | - ) | ||
| 224 | - ) | ||
| 207 | + logger.info("Starting bpython %s", __version__) | ||
| 208 | + logger.info("Python %s: %s", sys.executable, sys.version_info) | ||
| 209 | + logger.info("curtsies: %s", curtsies.__version__) | ||
| 210 | + logger.info("cwcwidth: %s", cwcwidth.__version__) | ||
| 211 | + logger.info("greenlet: %s", greenlet.__version__) | ||
| 212 | + logger.info("pygments: %s", pygments.__version__) # type: ignore | ||
| 213 | + logger.info("requests: %s", requests.__version__) | ||
| 214 | + logger.info("environment:") | ||
| 215 | + for key, value in sorted(os.environ.items()): | ||
| 216 | + if key.startswith("LC") or key.startswith("LANG") or key == "TERM": | ||
| 217 | + logger.info("%s: %s", key, value) | ||
| 225 | 218 | ||
| 226 | 219 | return Config(options.config), options, options.args | |
| 227 | 220 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,6 +55,8 @@ | |||
| 55 | 55 | from .importcompletion import ModuleGatherer | |
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | + logger = logging.getLogger(__name__) | ||
| 59 | + | ||
| 58 | 60 | # Autocomplete modes | |
| 59 | 61 | class AutocompleteModes(Enum): | |
| 60 | 62 | NONE = "none" | |
@@ -767,11 +769,8 @@ def get_completer( | |||
| 767 | 769 | ) | |
| 768 | 770 | except Exception as e: | |
| 769 | 771 | # Instead of crashing the UI, log exceptions from autocompleters. | |
| 770 | - logger = logging.getLogger(__name__) | ||
| 771 | 772 | logger.debug( | |
| 772 | - "Completer {} failed with unhandled exception: {}".format( | ||
| 773 | - completer, e | ||
| 774 | - ) | ||
| 773 | + "Completer %r failed with unhandled exception: %s", completer, e | ||
| 775 | 774 | ) | |
| 776 | 775 | continue | |
| 777 | 776 | if matches is not None: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1005,7 +1005,7 @@ def only_whitespace_left_of_cursor(): | |||
| 1005 | 1005 | """returns true if all characters before cursor are whitespace""" | |
| 1006 | 1006 | return not self.current_line[: self.cursor_offset].strip() | |
| 1007 | 1007 | ||
| 1008 | - logger.debug("self.matches_iter.matches:%r", self.matches_iter.matches) | ||
| 1008 | + logger.debug("self.matches_iter.matches: %r", self.matches_iter.matches) | ||
| 1009 | 1009 | if only_whitespace_left_of_cursor(): | |
| 1010 | 1010 | front_ws = len(self.current_line[: self.cursor_offset]) - len( | |
| 1011 | 1011 | self.current_line[: self.cursor_offset].lstrip() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments