Skip to content

mypy: Use --strict #859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Sep 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cd8f3c5
ci(mypy): mypy --strict
tony Dec 31, 2022
0d0cae4
ci(mypy): Enable incomplete feature (Unpack)
tony Sep 23, 2023
fe3e169
refactor!: Add typings from monkeytype
tony Dec 31, 2022
b907890
More autogenerated types
tony Sep 23, 2023
27018ce
chore(mypy): Typings for test_plugin_helpers
tony Sep 23, 2023
fa6e520
chore(mypy): Typings for test_builder
tony Sep 23, 2023
7b39602
chore(mypy): Typings for test_load
tony Jan 7, 2023
d4c7df5
chore(mypy): Typings for test_finder
tony Sep 23, 2023
a0598aa
chore(mypy): Typings for test_builder
tony Sep 23, 2023
0523b9a
chore(mypy): Typings for test_builder
tony Sep 23, 2023
1482ca3
chore(mypy): Typings for test_load.py
tony Sep 23, 2023
16645f3
chore(mypy): Add typings for test_cli.py
tony Sep 23, 2023
cc70fb6
chore(mypy): Add typings for test_util
tony Sep 23, 2023
7bed027
chore(mypy): Basic typings for plugin test partials
tony Sep 23, 2023
9d00b77
docs(conf): Typings for mypy
tony Sep 23, 2023
86cf7db
chore(mypy): Add typings for aafig
tony Sep 23, 2023
74a01fc
feat(_types): TYPE_CHECKING-guarded types, add PluginConfigSchema
tony Sep 23, 2023
74145bf
refactor(plugin): Add typings
tony Sep 23, 2023
28d54c9
chore(mypy): Add typing for plugin tests
tony Sep 23, 2023
ba77831
chore(mypy): Typings for plugin tests
tony Sep 23, 2023
b7749b3
refactor(tests[pluginsystem]): Use double splat
tony Sep 23, 2023
1d310ed
chore(mypy): Typings for tests/fixtures/pluginsystem/plugins
tony Sep 23, 2023
7415da4
chore(mypy): Typings for cli/edit
tony Sep 23, 2023
7d6be7e
chore(mypy): Ignore odd type issue in test_plugin_helpers
tony Sep 23, 2023
83d0aa9
chore(mypy): Add typings for cli/import_config
tony Sep 23, 2023
729ae23
chore(cli[freeze]): Remove session_completion
tony Sep 23, 2023
8df5939
chore(mypy): Add typings for cli/load
tony Sep 23, 2023
df84c46
chore(mypy): Typings for cli/debug_info
tony Sep 23, 2023
68b5628
refactor(mypy): Add typings for cli/utils
tony Sep 23, 2023
c77277e
chore(mypy): Add typings for cli/freeze
tony Sep 23, 2023
c965577
chore(mypy): Fix typings for workspace/freezer
tony Sep 23, 2023
1496f1d
refactor(mypy): Typings for tmuxp/shell
tony Sep 23, 2023
954f36f
chore(mypy): Add typings for plugin
tony Sep 23, 2023
083f5f8
chore(mypy): Typings for config_reader
tony Sep 23, 2023
071ec81
chore(mypy): Add typings exc
tony Sep 23, 2023
4b95fd5
chore(mypy): Add typings for workspace/loader
tony Sep 23, 2023
f0e637d
chore(mypy): Remove unused type: ignore from _compat
tony Sep 23, 2023
23fe049
chore(mypy): Add typings for log
tony Sep 23, 2023
b373740
docs(CHANGES): Note mypy strict compliance
tony Sep 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(mypy): Typings for test_builder
  • Loading branch information
tony committed Sep 23, 2023
commit 0523b9ae32b51b5a0490740a4a370a30a4f6750e
11 changes: 9 additions & 2 deletions tests/workspace/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def test_focus_pane_index(session: Session) -> None:
pane_base_index = 0 if not pane_base_index else int(pane_base_index)

# get the pane index for each pane
pane_base_indexes = [int(pane.index) for pane in session.attached_window.panes]
pane_base_indexes = [
int(pane.index)
for pane in session.attached_window.panes
if pane is not None and pane.index is not None
]

pane_indexes_should_be = [pane_base_index + x for x in range(0, 3)]
assert pane_indexes_should_be == pane_base_indexes
Expand Down Expand Up @@ -129,7 +133,7 @@ def f_check() -> bool:
p = None
pane_path = "/"

def f_check_again():
def f_check_again() -> bool:
nonlocal p
p = window3.attached_pane
assert p is not None
Expand Down Expand Up @@ -160,7 +164,9 @@ def test_suppress_history(session: Session) -> None:
builder.build(session=session)

inHistoryWindow = session.windows.get(window_name="inHistory")
assert inHistoryWindow is not None
isMissingWindow = session.windows.get(window_name="isMissing")
assert isMissingWindow is not None

def assertHistory(cmd: str, hist: str) -> bool:
return "inHistory" in cmd and cmd.endswith(hist)
Expand All @@ -175,6 +181,7 @@ def assertIsMissing(cmd: str, hist: str) -> bool:
assert w.name == window_name
w.select_window()
p = w.attached_pane
assert p is not None
p.select_pane()

# Print the last-in-history command in the pane
Expand Down