Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8ce916

Browse filesBrowse files
committed
Mark optional arguments as optional
1 parent 5629bbe commit f8ce916
Copy full SHA for f8ce916

2 files changed

+10-6Lines changed: 10 additions & 6 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/curtsiesfrontend/interpreter.py‎

Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/interpreter.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, Dict
2+
from typing import Any, Dict, Optional
33

44
from pygments.token import Generic, Token, Keyword, Name, Comment, String
55
from pygments.token import Error, Literal, Number, Operator, Punctuation
@@ -60,7 +60,11 @@ def format(self, tokensource, outfile):
6060

6161

6262
class Interp(ReplInterpreter):
63-
def __init__(self, locals: Dict[str, Any] = None, encoding=None):
63+
def __init__(
64+
self,
65+
locals: Optional[Dict[str, Any]] = None,
66+
encoding: Optional[str] = None,
67+
) -> None:
6468
"""Constructor.
6569
6670
We include an argument for the outfile to pass to the formatter for it
Collapse file

‎bpython/curtsiesfrontend/repl.py‎

Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/repl.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ class BaseRepl(Repl):
312312
def __init__(
313313
self,
314314
config: Config,
315-
locals_: Dict[str, Any] = None,
316-
banner: str = None,
317-
interp: code.InteractiveInterpreter = None,
318-
orig_tcattrs: List[Any] = None,
315+
locals_: Optional[Dict[str, Any]] = None,
316+
banner: Optional[str] = None,
317+
interp: Optional[code.InteractiveInterpreter] = None,
318+
orig_tcattrs: Optional[List[Any]] = None,
319319
):
320320
"""
321321
locals_ is a mapping of locals to pass into the interpreter

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.