File: options.py

package info (click to toggle)
mypy 0.812-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,596 kB
  • sloc: python: 74,869; cpp: 11,212; ansic: 3,935; makefile: 238; sh: 13
file content (17 lines) | stat: -rw-r--r-- 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from typing import Optional


class CompilerOptions:
    def __init__(self, strip_asserts: bool = False, multi_file: bool = False,
                 verbose: bool = False, separate: bool = False,
                 target_dir: Optional[str] = None,
                 include_runtime_files: Optional[bool] = None) -> None:
        self.strip_asserts = strip_asserts
        self.multi_file = multi_file
        self.verbose = verbose
        self.separate = separate
        self.global_opts = not separate
        self.target_dir = target_dir or 'build'
        self.include_runtime_files = (
            include_runtime_files if include_runtime_files is not None else not multi_file
        )