Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotester assigns full PyTA marks to code with syntax errors #583

Open
hhc97 opened this issue Feb 3, 2025 · 0 comments
Open

Autotester assigns full PyTA marks to code with syntax errors #583

hhc97 opened this issue Feb 3, 2025 · 0 comments

Comments

@hhc97
Copy link

hhc97 commented Feb 3, 2025

Markus setup:

Image

Example code:

    def __contains__(self, item: Any) -> bool:
        """Return whether <item> is in this list.

        Use == to compare items.

        >>> lst = three_items(1, 2, 3)
        >>> 2 in lst                     # Equivalent to lst.__contains__(2)
        True
        >>> 4 in lst
        False
        """
       current = self._first

        while current is not None:

            if current.item == item:

                return True

            current = current.next

        return False

The above code has a syntax error (see indentation of thecurrent = self._first line). When running the code, python returns this error:

  File "prep5.py", line 100
    current = self._first
                         ^
IndentationError: unindent does not match any outer indentation level

However, PyTA returns full marks for this file as seen below:

Image

After speaking with @david-yz-liu, I believe this is not intended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant