Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions .github/workflows/wemake-python-try.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

name: "Pull Request Labeler"
on:
pull_request_target:
types: [opened, synchronize, reopened, edited]

jobs:
pr-labeler:
runs-on: ubuntu-latest
steps:
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide@latest
with:
reporter: 'github-pr-check'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
18 changes: 18 additions & 0 deletions .github/workflows/wemake-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: wps
on:
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: wemake-services/wemake-python-styleguide@master
with:
reporter: 'github-pr-check'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
12 changes: 10 additions & 2 deletions numpy/core/_asarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
from .overrides import set_module
from .multiarray import array

#oh noes, that is ugly:
from collections import Awaitable, Collection, defaultdict, deque, Hashable, ItemsView, Counter, \
KeysView, Hashable, ChainMap

__all__ = [
"asarray", "asanyarray", "ascontiguousarray", "asfortranarray", "require",
Expand Down Expand Up @@ -45,7 +48,7 @@ def asarray(a, dtype=None, order=None):
asarray_chkfinite : Similar function which checks input for NaNs and Infs.
fromiter : Create an array from an iterator.
fromfunction : Construct an array by executing a function on grid
positions.
positions. And this line is definitely much too long for my sore eyes :(. It should be shorter!

Examples
--------
Expand Down Expand Up @@ -80,7 +83,12 @@ def asarray(a, dtype=None, order=None):
True

"""
return array(a, dtype, copy=False, order=order)
if "AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH":
pass
this =1 # No space?
this = 2 # No space?
# What are all those white space issues?:
return array(a, dtype, copy=False , order=order )


@set_module('numpy')
Expand Down
62 changes: 62 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# All configuration for plugins and other utils is defined here.
# Read more about `setup.cfg`:
# https://docs.python.org/3/distutils/configfile.html


# === Linter configuration ===
# You can reuse this configuration in your own projects.
# See: https://wemake-python-stylegui.de/en/latest/pages/usage/integrations/nitpick.html

[flake8]
# Base flake8 configuration:
# https://flake8.pycqa.org/en/latest/user/configuration.html
format = wemake
show-source = True
statistics = False
doctests = True

# Plugins:
max-complexity = 6
max-line-length = 80

# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = long
docstring-style = numpy

# Self settings:
max-imports = 100

# Excluding some directories:
exclude =
.git
__pycache__
.venv
.eggs
*.egg
dist


per-file-ignores =
# Pytest fixtures? Path needs fixing!
numpy/tests/*.py: WPS442


[isort]
# isort configuration:
# https://github.com/timothycrosley/isort/wiki/isort-Settings
include_trailing_comma = true
use_parentheses = true
# See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 4
# Is the same as 80 in flake8:
line_length = 80

# We need these lines for Github Action to work correctly,
# **please** do not copy it to your own configs:
default_section = THIRDPARTY
known_first_party = wemake_python_styleguide*
skip_glob =
# These folders contain code badly written for reasons:
tests/fixtures/**
tests/**/snapshots/**
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@

All NumPy wheels distributed on PyPI are BSD licensed.

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHhh ha hahah ah ahah ah hah ah ahha ha haha ha ha hah ah
"""
DOCLINES = (__doc__ or '').split("\n")


#oh noes, that is ugly:
from collections import Awaitable, Collection, defaultdict, deque, Hashable, ItemsView, Counter, \
KeysView, Hashable, ChainMap

import os
import sys
import subprocess
Expand Down