Skip to content

Conversation

@PeeachPie
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
codeplag
   __init__.py33316%5–6, 8–14, 16–17, 19–20, 22–34, 40–43, 45
   __main__.py330%1, 3–4
   codeplagcli.py102892%60–61, 63, 438, 449, 452, 460, 472
   config.py390100% 
   consts.py430100% 
   display.py1284961%45, 71, 99–102, 104, 116, 118–119, 121–124, 126–127, 129, 135, 137–138, 140–143, 145–146, 148, 150, 154, 170–172, 180–181, 188–189, 191, 196–197, 199–200, 202, 206–210, 214–215
   featurescache.py29679%31–32, 34, 37–38, 40
   getfeatures.py1268234%97–100, 102–104, 106–108, 113–116, 118–120, 125, 128–129, 135–137, 163–168, 170, 172, 178–182, 184–189, 191, 211–215, 217–220, 223–226, 228–229, 231, 233–234, 236, 256–260, 262–264, 266–267, 270–273, 275–276, 278, 280–281, 283
   logger.py613345%28–30, 33, 35, 40–41, 45, 49–51, 58, 62–64, 66, 70–72, 74–77, 79, 85–90, 94–95, 104
   reporters.py701085%40, 43, 57–58, 74, 76, 88, 92–93, 98
   translate.py5180%10
   types.py1430100% 
   utils.py45450%1–2, 4, 6, 11–12, 15–17, 20–23, 25–28, 30–35, 37–42, 44–45, 56–57, 59–60, 62–69, 73, 80
codeplag/algorithms
   __init__.py00100% 
   compare.py240100% 
   featurebased.py129397%36, 84, 102
   stringbased.py560100% 
   tokenbased.py45393%118, 137, 170
codeplag/cplag
   __init__.py00100% 
   const.py90100% 
   tree.py47491%33–36
   utils.py804741%22–24, 41–42, 61–62, 64–66, 68–69, 71–75, 77–80, 82, 93, 102, 104–105, 107–113, 116, 119–124, 126, 129–130, 132–133, 136, 142
codeplag/db
   __init__.py00100% 
   mongo.py1131884%62–64, 78–83, 85, 92–95, 121–122, 181–182
codeplag/handlers
   __init__.py00100% 
   check.py21215725%87–90, 92, 94–95, 97–102, 105, 109–116, 118–122, 124–125, 127, 129, 136–137, 149–150, 153, 155–159, 177–184, 186–189, 191–194, 201–202, 209–213, 223–228, 230–233, 238–247, 250–251, 261, 273–277, 282–293, 298–301, 304–305, 315–317, 319–323, 326, 331–341, 350, 353–355, 358–361, 363–364, 366, 374, 381–385, 391–392, 400–401, 416, 419, 457–460
   report.py2159953%84–94, 97–99, 108–111, 120–121, 123, 127, 143, 149–151, 250–251, 301–303, 306, 311–315, 319–321, 326–330, 333–335, 337, 349–352, 354–358, 361, 365–370, 394–398, 400–405, 432–435, 437–440, 442–447, 449, 456–458, 460–463, 472
   settings.py22220%1–2, 4–5, 7–8, 11–15, 20, 23–30, 32, 34
codeplag/pyplag
   __init__.py00100% 
   astwalkers.py65789%25–30, 38
   const.py70100% 
   utils.py945640%26–27, 34–35, 42–43, 51–52, 57–59, 73–74, 76–77, 83, 85–89, 106–107, 109–111, 113–114, 116–119, 121–124, 126, 137, 146, 148–149, 151–157, 159, 163, 166–167, 169–170, 173, 179
webparsers
   __init__.py00100% 
   async_github_parser.py1711710%1–5, 7–12, 14, 24, 27, 52–53, 55, 57, 59–60, 62, 64, 66–67, 69, 71, 79–80, 82, 84–86, 93–95, 97, 99, 104–109, 111, 114–116, 118–124, 126–127, 129–138, 140, 142–146, 148–151, 156–158, 168–169, 171, 173, 175–176, 178, 180, 183, 187, 189–193, 195–200, 209–210, 212, 214, 216, 222, 226–227, 229, 232, 243, 245, 247, 256, 259–266, 274–276, 281, 283, 285, 291, 293, 296–300, 302–303, 305–306, 309, 319–320, 327, 329–334, 336, 346, 354, 357–361, 363, 373–375, 378–380, 383, 391–392, 397, 399, 403, 409
   github_parser.py1842685%37, 56–58, 64, 74, 77–80, 88–91, 122, 151, 251, 260–262, 293–295, 314–316
   types.py630100% 
TOTAL236388162% 

@Artanias Artanias added the Refactoring Changes made to the code to improve readability, speed of execution, and logic between parts. label Nov 8, 2025
@Artanias Artanias added this to the v0.6.0 milestone Nov 8, 2025
@Artanias Artanias changed the title unnecessary github_user check refactor: removes unnecessary github_user check Nov 8, 2025
self.github_files: list[str] = parsed_args.pop("github_files", [])
self.github_project_folders: list[str] = parsed_args.pop("github_project_folders", [])
self.github_user: str = parsed_args.pop("github_user", "") or ""
self.github_user: str = parsed_args.pop("github_user", "")
Copy link
Collaborator

Choose a reason for hiding this comment

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

>>> from codeplag.codeplagcli import CodeplagCLI
>>> cli = CodeplagCLI()
>>> cli.parse_args(["check", "--extension", "py"])
Namespace(root='check', directories=[], files=[], mode='many_to_many', path_regexp=None, ignore_threshold=False, extension='py', all_branches=False, repo_regexp=None, github_files=[], github_user=None, github_project_folders=[])

Т.е. по умолчанию инициализирует парсер в None, а далее тут попадает None и для этого сделано условие or "".

@Artanias Artanias closed this Nov 8, 2025
@Artanias Artanias deleted the unnecessary_github_user_check branch November 8, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactoring Changes made to the code to improve readability, speed of execution, and logic between parts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants