CodeAnt AI home pagelight logodark logo
  • Dashboard
  • Dashboard
  • Documentation
  • Demo Call with CEO
  • Blog
  • Slack
  • Get Started
    • CodeAnt AI
    • Setup
    • 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
    Lang

    Best practice

    manually creating a defaultdict - use collections.defaultdict(dict)

    manually creating a defaultdict - use collections.defaultdict(set)

    manually creating a defaultdict - use collections.defaultdict(list)

    manually creating a counter - use collections.Counter

    Detected hardcoded temp directory. Consider using ‘tempfile.TemporaryFile’ instead.

    Class $A has defined __eq__ which means it should also have defined __hash__;

    pass is the body of function $X. Consider removing this or raise NotImplementedError() if this is a TODO

    pass is the body of for XinX in XinY. Consider removing this or raise NotImplementedError() if this is a TODO

    time.sleep() call; did you mean to leave this in?

    Missing ‘encoding’ parameter. ‘open()’ uses device locale encodings by default, corrupting files with special characters. Specify the encoding to ensure cross-platform support when opening files in text mode (e.g. encoding=“utf-8”).

    file object opened without corresponding close

    Importing the python debugger; did you mean to leave this in?

    Errors should only be logged when handled. The code logs the error and propogates the exception, consider reducing the level to warning or info.

    AuditTainted code stdlib
    twitterlinkedin
    Powered by Mintlify