Get Started
- CodeAnt AI
- Control Center
- Pull Request Review
- IDE
- Compliance
- Anti-Patterns
- Code Governance
- Infrastructure Security Database
- Application Security Database
- Apex
- Bash
- C
- Clojure
- Cpp
- Csharp
- Dockerfile
- Elixir
- Fingerprints
- Generic
- Go
- Html
- Java
- Javascript
- Json
- Kotlin
- Ocaml
- Php
- Problem-based-packs
- Python
- Airflow
- Attr
- Aws-lambda
- Bokeh
- Boto3
- Cassandra
- Click
- Correctness
- Couchbase
- Cryptography
- Distributed
- Django
- Docker
- Elasticsearch
- Fastapi
- Flask
- Jinja2
- Jwt
- Lang
- Best practice
- Code
- Compatibility
- Correctness
- Correctness
- Deserialization
- File
- Hardcoded
- Maintainability
- Os
- Security
- Security
- Ldap3
- Mariadb
- Mysql
- Mysqlclient
- Neo4j
- Openai
- Peewee
- Pg8000
- Psycopg2
- Pycryptodome
- Pyjwt
- Pymongo
- Pymssql
- Pymysql
- Pyramid
- Redis
- Requests
- Sh
- Sqlalchemy
- Tormysql
- Urllib3
- Webrepl
- Wtforms
- Ruby
- Rust
- Scala
- Solidity
- Swift
- Terraform
- Typescript
- Yaml
Correctness
snapshot.assert_match makes use of pathlib to create files. Patching $METHOD may result in unexpected snapshot behavior
Synchronous time.sleep in async code will block the event loop and not allow other tasks to execute. Use asyncio.sleep() instead.
This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead
Class Cinheritsfromboth‘Aand
B‘whichbothhaveamethodnamed‘F`; one of these methods will be overwritten.
Detected a file object that is redefined and never closed. This could leak file descriptors and unnecessarily consume system resources.
Values returned by thread pool map must be read in order to raise exceptions. Consider using for _ in $EXECUTOR.map(...): pass
.
return
should never appear inside a class init function. This will cause a runtime error.
yield
should never appear inside a class init function. This will cause a runtime error.
It appears that $LIST
is a list that is being modified while in a for loop. This will likely cause a runtime error or an infinite loop.
Detected use of exit
. Use sys.exit
over the python shell exit
built-in. exit
is a helper for the interactive shell and may not be available on all Python implementations.
The file object ‘$FD’ was opened in read mode, but is being written to. This will cause a runtime error.
Using strings as booleans in Python has unexpected results. "one" and "two"
will return “two”. "one" or "two"
will return “one”. In Python, strings are truthy, and strings with a non-zero length evaluate to True.
Comparison without assertion. The result of this comparison is not used. Perhaps this expression is missing an assert
keyword.
It appears that $DICT[$KEY]
is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration
Generators can only be consumed once, so in most cases, caching them will cause an error when the already-consumed generator is retrieved from cache.
pdb is an interactive debugging tool and you may have forgotten to remove it before committing your code
This expression is always True: $X == $X
or $X != $X
. If testing for floating point NaN, use math.isnan($X)
, or cmath.isnan($X)
if the number is complex.