Visitar URL original
Implement import conventions by edgarrmondragon · Pull Request #1098 · astral-sh/ruff · GitHub
Skip to content

Implement import conventions - #1098

Merged
charliermarsh merged 17 commits into
astral-sh:mainfrom
edgarrmondragon:1004-import-conventions
Dec 6, 2022
Merged

charliermarsh merged 17 commits into
astral-sh:mainfrom
edgarrmondragon:1004-import-conventions

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Dec 6, 2022 •

Copy link
Copy Markdown
Contributor

Closes #1004

@edgarrmondragon
edgarrmondragon marked this pull request as ready for review December 6, 2022 05:46
@JonathanPlasse

Copy link
Copy Markdown
Contributor

Maybe add a test that overrides a default conventional alias (e.g. "numpy" = "nmp" instead of np) and an other ones that remove a default conventional alias (e.g. "seaborn": "" would remove from the map "seaborn": "sns").

Comment thread README.md Resolved
Comment thread README.md Resolved
@edgarrmondragon

edgarrmondragon commented Dec 6, 2022 •

Copy link
Copy Markdown
Contributor Author

Maybe add a test that overrides a default conventional alias (e.g. "numpy" = "nmp" instead of np) and an other ones that remove a default conventional alias (e.g. "seaborn": "" would remove from the map "seaborn": "sns").

@JonathanPlasse Ah, so you're thinking the configured aliases would extend the default ones instead of completely overriding them. That makes sense, so users wouldn't have to re-declare "pandas" = "pd" if they just want to add a new alias. I'll work on that approach.

Comment thread README.md Resolved
Comment thread src/flake8_import_conventions/checks.rs Resolved
@charliermarsh
charliermarsh merged commit ea550ab into astral-sh:main Dec 6, 2022
@charliermarsh

Copy link
Copy Markdown
Member

Rock, thank you @edgarrmondragon! Made a couple changes at the end but LMK if you disagree w/ any of them!

@edgarrmondragon
edgarrmondragon deleted the 1004-import-conventions branch December 6, 2022 21:05
@edgarrmondragon
edgarrmondragon restored the 1004-import-conventions branch December 6, 2022 21:05
@edgarrmondragon
edgarrmondragon deleted the 1004-import-conventions branch December 6, 2022 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement import conventions

3 participants