Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commits, add and address flake8 #195

Merged
merged 3 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
args: ['--fix=lf']
- id: trailing-whitespace
- repo: https://github.com/google/pre-commit-tool-hooks
rev: v1.0.4
rev: v1.1.0
hooks:
- id: check-copyright
args:
Expand All @@ -34,6 +34,8 @@ repos:
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
exclude: '^src/jekyll/(Gemfile.lock|theme/.*)$'
- id: check-google-doc-style
- id: markdown-toc
- repo: https://github.com/codespell-project/codespell
rev: v1.17.1
hooks:
Expand All @@ -42,14 +44,6 @@ repos:
exclude: '^src/jekyll/Gemfile.lock$'
- repo: local
hooks:
- id: markdown-toc
name: Update table of contents
description: Runs https://github.com/jonschlinkert/markdown-toc
entry: src/scripts/pre_commit_toc.js
language: node
additional_dependencies: [markdown-toc]
files: .*\.md$
exclude: ^src/jekyll/theme/
- id: proposal-list
name: Update list of proposals
description: Updates the list of proposals in proposals/README.md
Expand All @@ -67,3 +61,8 @@ repos:
hooks:
- id: prettier
exclude: ^src/jekyll/theme/
# Run linters last, as formatters and other checks may fix issues.
- repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.4
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Context and disclaimer](#context-and-disclaimer)
- [Example code](#example-code)
- [Basic syntax](#basic-syntax)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Alternatives](#alternatives)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/blocks_and_statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/code_and_name_organization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Goals and philosophy](#goals-and-philosophy)
- [Overview](#overview)
- [Sizing packages and libraries](#sizing-packages-and-libraries)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/code_and_name_organization/source_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Overview](#overview)
- [Encoding](#encoding)
- [References](#references)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/control_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Open questions](#open-questions)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Basic functions](#basic-functions)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/interoperability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/lexical_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Lexical elements](#lexical-elements)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/lexical_conventions/numeric_literals.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Overview](#overview)
- [Details](#details)
- [Integer literals](#integer-literals)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/lexical_conventions/whitespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Overview](#overview)

<!-- tocstop -->
Expand Down
4 changes: 2 additions & 2 deletions docs/design/lexical_conventions/words.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Overview](#overview)
- [Alternatives](#alternatives)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/metaprogramming.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/name_lookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Unqualified name lookup](#unqualified-name-lookup)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/naming_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)

Expand Down
4 changes: 2 additions & 2 deletions docs/design/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)

<!-- tocstop -->
Expand Down
4 changes: 2 additions & 2 deletions docs/design/pattern_matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Pattern match control flow](#pattern-match-control-flow)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/primitive_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Integers](#integers)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Open questions](#open-questions)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/syntactic_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Alternatives](#alternatives)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Types with template parameters](#types-with-template-parameters)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/tuples.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Indices as compile-time constants](#indices-as-compile-time-constants)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [TODO](#todo)
- [Overview](#overview)
- [Declaring constants](#declaring-constants)
Expand Down
4 changes: 2 additions & 2 deletions docs/project/code_review.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [High level goals of code review](#high-level-goals-of-code-review)
- [What requires review?](#what-requires-review)
- [Who should review?](#who-should-review)
Expand Down
4 changes: 2 additions & 2 deletions docs/project/contribution_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
The Carbon language project has a number of tools used to assist in preparing
contributions.

## Table of contents

<!-- toc -->

## Table of contents

- [Main tools](#main-tools)
- [brew](#brew)
- [pyenv and Python](#pyenv-and-python)
Expand Down
4 changes: 2 additions & 2 deletions docs/project/cpp_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Background](#background)
- [Baseline](#baseline)
- [Carbon-local guidance](#carbon-local-guidance)
Expand Down
4 changes: 2 additions & 2 deletions docs/project/goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

## Table of contents

<!-- toc -->

## Table of contents

- [Overview](#overview)
- [Project goals](#project-goals)
- [Community and culture](#community-and-culture)
Expand Down
Loading