view roundup/anypy/scandir_.py @ 8548:98011edc6c60

refactor: remove duplicate code block Had the same code inside two different if statements. Replaced with 'if X in [ a, b ] ' and only one copy of the code.
author John Rouillard <rouilj@ieee.org>
date Thu, 26 Mar 2026 21:46:19 -0400
parents 5c5723cd721a
children
line wrap: on
line source

try:
    # python 3.5+
    from os import scandir
except ImportError:
    # python 2 fallback
    import os

    import scandir  # pip package
    os.scandir = scandir.scandir

Roundup Issue Tracker: http://roundup-tracker.org/