Skip to content
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

allow disabling move to top functionality #257

Merged
merged 12 commits into from
Jul 11, 2024
Prev Previous commit
Next Next commit
updates
  • Loading branch information
wbbradley committed Jul 9, 2024
commit 7119235f7535d5be9627a1826bdc60a5c89cb106
6 changes: 4 additions & 2 deletions src/autoimport/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ def _find_package_in_typing(name: str) -> Optional[str]:
return None

def _get_disable_move_to_top(self) -> bool:
"""When parsing to the cli via --config-file the config becomes nested."""
"""Fetch the disable_move_to_top configuration value."""
# When parsing to the cli via --config-file the config becomes nested.
disable_move_to_top = self.config.get("disable_move_to_top")
if disable_move_to_top is not None:
return disable_move_to_top
Expand All @@ -428,7 +429,8 @@ def _get_disable_move_to_top(self) -> bool:
)

def _get_additional_statements(self) -> Dict[str, str]:
"""When parsing to the cli via --config-file the config becomes nested."""
"""Fetch the common_statements configuration value."""
# When parsing to the cli via --config-file the config becomes nested.
config_statements = self.config.get("common_statements")
if config_statements:
return config_statements
Expand Down
Loading