Skip to content

octue/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Octue GitHub Settings

Welcome to Octue! This repository defines settings and workflows that are applied universally across all Octue repositories.

Octue python standards

One-line if/else statements

One-line if/else statements should be avoided except when dealing with default mutable arguments. For example,

iterations = iterations if mode == "iteration" else None

should be avoided, but the following is fine to use:

def my_function(a, b=None):
    b = b if b is None else []  # Note that this can usually (but not always) be written better as b = b or []

The reason for avoiding these statements is that the test coverages of the if and else conditions are not measured independently unless they are on their own lines, resulting in misleading coverage statistics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages