question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Forbid importing protected names

See original GitHub issue

Rule request

Thesis

We need to restrict import like:

from test import _protected
from test._protected import run

This rule looks quite the same as #272 but it is a separate rule.

Reasoning

We should not use protected modules and names. It is not guaranteed to work as we want it to work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sobolevncommented, Oct 19, 2018

@ming060 I would be happy to merge it!

0reactions
ming060commented, Oct 21, 2018

@sobolevn, Great, I will do that. I already saw lots difference between our changes. And I am not sure which one is better. I look forward to gaining the feedback. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preventing Python code from importing certain modules?
I need a way to prevent the exec'ed code from importing certain modules, so malicious code won't be as much of a problem....
Read more >
Prohibited and Restricted Items - Customs and Border Protection
CBP will seize any illegal drug paraphernalia. Law prohibits the importation, exportation, manufacture, sale or transportation of drug paraphernalia. If you ...
Read more >
15 U.S. Code § 1125 - False designations of origin, false ...
15 U.S. Code § 1125 - False designations of origin, false descriptions, and dilution forbidden ; (i). The degree of similarity between the...
Read more >
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >
Prevent updates to stack resources - AWS CloudFormation
To protect stack resources from update actions, define a stack policy and then set it on your stack. A stack policy is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found