guardicore / guardicore/monkey

Allow-redefinition in mypy

Open
#2,928 1 comment 0 reactions 0 assignees View on GitHub
Enhancement Refactor
Dominant language
Python
Stars
7.1k
Forks
830
PR merge metrics
No merged PRs in 30d

Description

# Refactor

## Component(s) to be refactored

We should run mypy with `--allow-redefinition` flag. It's useful in resources/serialization. Example:
```
def get(self, exploiter: str):
exploiter = Exploiter(exploiter)
```
`exploiter` is the best name for the hypothetical "Exploiter" object. We can't change the argument to `exploiter_string`, because it's obvious that you pass strings into the url.
`--allow-redefinition` is the best way to keep code clean in this case.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.