-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
There's https://github.com/joaopalmeiro/flake8-import-conventions to serve as inspiration, though I'm not sure if I'd like to replicate the behavior 100%.
It has an error code for each convention:
name2asname: Dict[str, str] = {
"altair": "alt", # IC001
"numpy": "np", # IC002
"pandas": "pd", # IC003
"seaborn": "sns", # IC004
}The biggest problem with this approach is that it's not possible to expand with custom conventions without forking the repo.
One alternative would be to use a single error code for all conventions, default to the ones above, and allow users to configure a custom mapping:
[tool.ruff.import_conventions.aliases]
pulumi_aws = "aws"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule