Skip to content

Add intentional violations test file for Tanagram rule enforcement#3

Open
swadib wants to merge 1 commit intomainfrom
commit
Open

Add intentional violations test file for Tanagram rule enforcement#3
swadib wants to merge 1 commit intomainfrom
commit

Conversation

@swadib
Copy link
Copy Markdown
Owner

@swadib swadib commented Feb 11, 2026

No description provided.

"""Another bare except for Tanagram to catch."""
try:
import json
return json.loads(raw)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare except: clause on json.loads() operation. Should catch specific exceptions like json.JSONDecodeError. Silently returns None, hiding parsing failures. (View/Edit your rule)

# Simulate a request that might fail
response = _mock_request(url, API_KEY)
return response
except:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare except: clause without exception type specification. Swallows all errors including KeyboardInterrupt and SystemExit, making debugging impossible. (View/Edit your rule)

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

Successfully merging this pull request may close these issues.

1 participant