Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

undefined variables do not raise a type error

Open
#50 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by running the reported Python program through Static Python's type checker and trace the static analysis path for name resolution. Confirm that the undefined variable currently passes, then add coverage for this reproducer and verify that checking it reports the undefined name at compile time.

Written by the indexing model from the issue text.

Description

sp-correctness staticpython
What version of Static Python are you using?

6862bbd
2021-10-07

What program did you run?
def f() -> int:
    return a_definitly_undefined_variable
What happened?

The program passes type checks.

What should have happened?

We expected a compile-time error complaining that a_definitly_undefined_variable is undefined. (This is what mypy does.)

Dominant language
Python
Stars
3.8k
Forks
139
PR merge metrics
No merged PRs in 30d

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.

More from facebookincubator/MetaPython

All issues in facebookincubator/MetaPython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.