Skip to content

Fix indentation error in scripts#38

Open
Nonoka-T wants to merge 3 commits into
sehmaluva:mainfrom
Nonoka-T:fix-indentation-error-in-scripts
Open

Fix indentation error in scripts#38
Nonoka-T wants to merge 3 commits into
sehmaluva:mainfrom
Nonoka-T:fix-indentation-error-in-scripts

Conversation

@Nonoka-T

Copy link
Copy Markdown
Contributor

📋 Description

This PR resolves a CI failure caused by pre-existing syntax issues in two script files.

What type of contribution is this?

  • 👤 Profile (Adding or updating a student profile)
  • 🧩 Challenge (Solving a coding challenge)
  • 🚀 Project (Building a new project or feature)
  • 📜 Script (Adding a helpful script or tool)
  • 📝 Documentation (Improving docs, README, or guides)
  • 🐛 Bug Fix (Fixing an issue)
  • ✨ Enhancement (Improving existing functionality)
  • 🎨 Design (UI/UX improvements)

What does this PR do?

This PR fixes IndentationError in two files that were causing the Multi-Language Testing / test-python CI workflow to fail on every pull request

  • scripts/badge_generator_sehmaluva.py
  • scripts/generate_badges.py

The indentation of the affected lines has been corrected to match the surrounding code blocks, allowing flake8 to run without E999 errors.

Related Issue


🎯 For Beginners: Step-by-Step Guide

Before Submitting

  1. ✅ I have tested my changes locally

    • Run your code to make sure it works
    • Check for any errors or warnings
  2. ✅ I have followed the project guidelines

  3. ✅ I have updated documentation (if needed)

    • Updated README if adding new features
    • Added comments to complex code
    • Created/updated any relevant docs

Need Help?

  • 💬 Ask questions in the comments below
  • 📖 Read the guides in docs/guides/
  • 🆘 Tag a maintainer with @mention if stuck
  • 🎓 Check our FAQ for common issues

🧪 Testing

How to test this PR?

  1. Run flake8 scripts/ --count --select=E9,F63,F7,F82 --show-source --statistics
  2. Confirm the output is 0 (no errors)
  3. Run the Multi-Language Testing / test-python workflow and confirm the Lint with flake8 step passes

Test Results

<img width="953" height="72" alt="Screenshot 2026-06-14 at 11 28 46" src="https://github.com/user-attachments/assets/d8662f34-10b8-49b9-b788-1f46722f120f" />


📸 Screenshots / Demo

N/A

Before

After


📝 Checklist

Code Quality

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have checked for and fixed any typos

Documentation

  • I have updated the README (if applicable)
  • I have added/updated comments in my code
  • I have updated relevant documentation in /docs
  • My profile follows the template (for profile contributions)

Testing & Validation

  • I have tested my changes locally
  • I have added tests that prove my fix/feature works (if applicable)
  • All existing tests pass with my changes
  • I have checked that my changes don't break other features

Git & Commit

  • My branch is up to date with the main branch
  • I have used clear, descriptive commit messages
  • I have squashed any unnecessary commits
  • My PR title clearly describes what this PR does

🎓 For Different Contribution Types

📱 Profile Contributions

Profile Checklist

  • Used the profile template from docs/templates/PROFILE_TEMPLATE.md
  • File is named profiles/YOUR_GITHUB_USERNAME.md
  • Included your name, school, and interests
  • Profile is professional and respectful
  • No personal sensitive information included

Profile Tips

  • ✅ Be authentic and showcase your personality
  • ✅ Include your learning goals
  • ✅ Mention technologies you're interested in
  • ✅ Add a fun fact about yourself
  • ❌ Don't include email, phone, or address
  • ❌ Don't use offensive language
🧩 Challenge Solutions

Challenge Checklist

  • My solution is in the correct directory (challenges/level/challenge-name/)
  • I have included clear comments explaining my approach
  • My solution handles edge cases
  • I have tested with different inputs
  • My code follows the challenge requirements

Challenge Tips

  • ✅ Explain your thought process in comments
  • ✅ Consider time and space complexity
  • ✅ Test with edge cases (empty inputs, large numbers, etc.)
  • ✅ Write clean, readable code
  • ❌ Don't just copy solutions from the internet
  • ❌ Don't submit untested code
🚀 Project Contributions

Project Checklist

  • Project has a clear README with setup instructions
  • All dependencies are documented
  • Code is organized and well-structured
  • Project follows the directory structure guidelines
  • Includes examples or demo (if applicable)

Project Tips

  • ✅ Include a demo or screenshots
  • ✅ Write clear setup/installation steps
  • ✅ Add error handling
  • ✅ Make it beginner-friendly
  • ✅ Include a "How to Use" section
  • ❌ Don't commit node_modules, .env, or build artifacts
  • ❌ Don't include sensitive data or API keys
📝 Documentation

Documentation Checklist

  • Writing is clear and easy to understand
  • Grammar and spelling are correct
  • Links are working and relevant
  • Examples are included where helpful
  • Follows the project's documentation style

Documentation Tips

  • ✅ Write for beginners
  • ✅ Use examples to clarify complex topics
  • ✅ Break content into sections with headers
  • ✅ Include code blocks with proper syntax highlighting
  • ❌ Don't assume prior knowledge
  • ❌ Don't use overly technical jargon without explanation

🌟 Additional Information

What I learned while working on this:

How a single misplaced indentation can cause flake8 to raise E999 SyntaxError which blocks the entire CI workflow before any other checks can run.

Challenges I faced:

The first flake8 run only revealed one error per file. After fixing it, a second indentation error appeared further down in the same file.

Questions for reviewers:


📚 Resources I Used


💬 Notes for Reviewers


@Nonoka-T

Copy link
Copy Markdown
Contributor Author

@sehmaluva Hi, I've fixed indentation error. Please kindly check my PR. Thank you!

@sehmaluva

Copy link
Copy Markdown
Owner

@Nonoka-T This is good by the .idea directory is still tracked. You need to pull the latest changes from main to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Fix: IndentationError in scripts/ causes CI flake8 check to fail

2 participants