Closed Robpol86 closed 8 years ago
Are you in Google mode?
Yep I am.
I also see this.
Minimal test case. Here is the file
import json
import logging
import os
import sys
import yaml
from troposphere import Base64, FindInMap, GetAZs, GetAtt, Join, Output, Ref, Tags, Template
from troposphere.autoscaling import AutoScalingGroup, BlockDeviceMapping, \
EBSBlockDevice, LaunchConfiguration, Tag
from troposphere.ec2 import InternetGateway, Route, RouteTable, SecurityGroup, \
SecurityGroupIngress, Subnet, SubnetRouteTableAssociation, VPC, \
VPCGatewayAttachment
from troposphere.elasticloadbalancing import ConnectionDrainingPolicy, \
HealthCheck, LoadBalancer, Policy
from troposphere.iam import InstanceProfile, PolicyType, Role
from troposphere.rds import DBInstance, DBSubnetGroup
from troposphere.route53 import AliasTarget, RecordSet, RecordSetGroup
from troposphere.s3 import Bucket, BucketPolicy
from bootstrap_cfn import errors, utils
And the command to run
flake8 --import-order-style=cryptography --application-import-names=tests,bootstrap_cfn -j 0 --ignore F811,F401,F403 test.py
Gives this output:
test.py:8:1: I100 Imports statements are in the wrong order. from troposphere should be before import yaml
Or is this a different case and I'm min-understanding how it works. I thought all 'imports' should come before 'from' imports.
This is not google style, although cryptography and Smarkets style are. The recommended fix is to chose one of those styles.
In 0.5 this worked fine:
But in 0.6 I'm getting:
0.6 wants to put "from distutils..." between codecs and os.