Forbid from-import
for meaningless names
#814
Labels
Hacktoberfest
Hactoberfest fun!
help wanted
Extra attention is needed
level:starter
Good for newcomers
pr-merged
rule request
Adding a new rule
Milestone
Rule request
Thesis
Some packages designed to be imported only as module, and functions inside have name that completes module name.
Bad:
Reasoning
When you see
datetime(...)
in the code, you know that it's fromdatetime
. When you seeBaseView
in a Django project, you know that it's from Django framework. When you seeloads
, it can be anything: yaml, toml, json, custom config.Proposed solution
Consider the next blacklist:
load
,loads
dump
,dumps
parse
safe_load
,safe_dump
,load_all
,dump_all
,safe_load_all
,safe_dump_all
from_
orto_
The text was updated successfully, but these errors were encountered: