wemake-services / wemake-services/wemake-python-styleguide

Eval boolean operations

Open
#1,056 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted level:advanced
Dominant language
Python
Stars
2.9k
Forks
430
Avg merge
5h 14m
Merged PRs (30d)
34

Description

We need to eval things we can.

This issue is about working with booleans.
For example: True and False is False, we can easily find this out.
But, True and False is not semantically the same as False, because False is ast.NameConst and True and False is ast.BinOp

That's why evaluating booleans will give us new potential to find new bugs.

Related: https://github.com/wemake-services/wemake-python-styleguide/issues/1009

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test entry point is named. Start by reading the related issue #1009 and the evaluator or AST-handling code, then compare ast.NameConst with ast.BinOp for expressions such as True and False; done means supported boolean expressions are evaluated and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.