Skip to content

easy fixes #83

@shimwell

Description

@shimwell

Easy Fixes

  1. Spelling Typos (9 occurrences)

"begining" → "beginning"

  • openmc/data/function.py:171

"Accomodate" → "Accommodate" (8 occurrences)

  • openmc/mgxs/mgxs.py:1167, 1280, 2338, 4668, 5756, 6146
  • openmc/mgxs/mdgxs.py:1386, 2354
  1. Anti-pattern Type Checks

Using isinstance(x, type(None)) instead of is None

  • openmc/deplete/stepresult.py:583

Current:

if isinstance(op_results.k, type(None)):

Better:

if op_results.k is None:

Using type() comparison instead of isinstance()

  • openmc/tallies.py:3359

Current:

if type(self_filter) == filter_type:

Better:

if isinstance(self_filter, filter_type):

  1. Overly Broad Exception Handling

Two locations catch generic Exception which could be more specific:

  • openmc/config.py:205
  • openmc/data/multipole.py:1116

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions