Skip to content

Commit

Permalink
Fix requirements and new mypy issues (#18)
Browse files Browse the repository at this point in the history
* Fix requirements and new mypy issues

* Fix mypy issue in hover
  • Loading branch information
thomashacker authored Apr 7, 2023
1 parent 8f5af6c commit a5f2c66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions server/feature_hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ def registry_resolver(
)

# Fix the formatting of docstrings for display in hover
formatted_docstring = format_docstrings(registry_docstring)

formatted_docstring = format_docstrings(registry_docstring) # type:ignore[arg-type]
hover_display = (
f"### (*registry*) {registry_func}\n\n{registry_link}\n\n{formatted_docstring}"
)
Expand Down Expand Up @@ -241,7 +240,9 @@ def section_resolver(
elif current_word == sub_section and main_section in config_schemas.keys():
# get field title from the config schema
field_title = (
config_schemas[main_section].__fields__[sub_section].field_info.title
config_schemas[main_section]
.__fields__[sub_section] # type:ignore[attr-defined]
.field_info.title
)
hover_display = (
f"(*section*) {main_section} -> **{sub_section}**: {field_title}"
Expand Down
6 changes: 3 additions & 3 deletions server/tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest
pytest==7.2.1
mock
types-mock
mypy
black
mypy==1.0.1
black==23.3.0

0 comments on commit a5f2c66

Please sign in to comment.